package test.office

/**
 * @author: Yardena
 * @date: Aug 12, 2009 7:33:36 PM
 */

trait Office {
 def employees: Iterable[Employee]
 def departments: Iterable[Department]
}

class Employee(val name:String, val id:Int, val dept_id: Int, val manager: Boolean)

class Department(val name:String, val id:Int) 

object OfficeObject extends Office {
  def employees: Iterable[Employee] =
    new Employee("John Doe",      1, 1, false) ::
    new Employee("Jane Doe",      2, 1, false) ::
    new Employee("Micky Mouse",   3, 2, true)  ::
    new Employee("Donald Duck",   4, 2, false) ::
    new Employee("Eleanor Rigby", 5, 3, false) ::
    new Employee("Billy Shears",  6, 3, true)  ::
    new Employee("Jenny Wren",    7, 3, false) ::
    Nil
  def departments: Iterable[Department] =
    new Department("ACME", 1) :: new Department("Disney", 2) :: new Department("Beatles", 3) :: Nil
}
